home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Comms & Internet / LinkConverter 1.1.2 / Dialog Director v0.7 / Examples / Current App.as < prev    next >
Encoding:
Text File  |  1998-01-12  |  805 b   |  15 lines  |  [TEXT/ToyS]

  1. on DoUpdate()
  2.     tell application "Finder" to set p to processes whose frontmost is true
  3.     if p = {} then set p to application "Finder"
  4.     dd set value of items 2 thru 3 of dialog 1 to [(application info for current application)'s name, (application info for p)'s name]
  5. end DoUpdate
  6.  
  7. set dlog to {size:[400, 120], name:"Current Application", style:standard window, contents:[¬
  8.     {class:push button, bounds:[320, 90, 380, 110], name:"Update", action:DoUpdate}, ¬
  9.     {class:text field, bounds:[165, 20, 376, 36]}, ¬
  10.     {class:text field, bounds:[165, 50, 376, 66]}, ¬
  11.     {class:static text, bounds:[20, 20, 160, 36], contents:"Current Application:"}, ¬
  12.     {class:static text, bounds:[20, 50, 160, 66], contents:"Front Application:"} ¬
  13.         ], closeable:true}
  14.  
  15. dd auto dialog dlog float above every application with grayscale